//
//  UILabel+Indent.m
//  ZSHUDManager
//
//  Created by 字节科技 on 2018/12/25.
//  Copyright © 2018 Byte. All rights reserved.
//

#import "UILabel+Indent.h"

@implementation UILabel (Indent)

-(void)changeTextIndent:(CGFloat )indent{
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
    paragraphStyle.firstLineHeadIndent = indent; // 首行缩进
    paragraphStyle.alignment = NSTextAlignmentJustified;
    NSMutableDictionary *attributes = [@{NSParagraphStyleAttributeName:paragraphStyle}mutableCopy];
    self.attributedText = [[NSAttributedString alloc]initWithString:self.text attributes:attributes];
}

@end
